Skip to content

fix: persist selected view after refresh#680

Open
binduhasini11 wants to merge 1 commit into
Charushi06:mainfrom
binduhasini11:fix-persist-active-view
Open

fix: persist selected view after refresh#680
binduhasini11 wants to merge 1 commit into
Charushi06:mainfrom
binduhasini11:fix-persist-active-view

Conversation

@binduhasini11
Copy link
Copy Markdown

Related Issue

Closes #443

Summary

Implemented persistent view state so the selected sidebar section remains active after refreshing the page.

Changes Made

  • Added localStorage support to save the current active view.
  • Created a centralized applyView() function to handle view switching logic.
  • Refactored duplicated sidebar view code into a reusable function.
  • Restored the previously selected view automatically on page reload.
  • Added validation fallback to default to calendar if stored view is invalid.

Testing

  • Ran the project locally using npm start.
  • Verified that Calendar, All Tasks, Archived, and Focus views persist correctly after refresh.
  • Confirmed sidebar active states update properly across all views.
  • Checked that no existing functionality was broken after refactoring.

Checklist

  • Code follows project style
  • Tested locally
  • No unrelated changes included
  • Documentation updated (if applicable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Navigation view resets to Calendar/Home page after refresh

1 participant